<!--点击我的上边蓝色部分进入的资料修改部分-->
<template>
  <div class="upload">
    <div class="upload_div1">
      <van-uploader id="upwidth">
        <van-cell is-link class="upload_div1_cell1" :after-read="afterRead">
          <!-- 使用 title 插槽来自定义标题 -->
          <template #title class="upload_div1_cell1_t">
            <span class="custom-title">头像</span>
          </template>
          <template #default class="upload_div1_cell1_d">
            <span class="value-class upload_div1_cell1_d_span">
              <img
                class="upload_div1_cell1_d_span_img"
                src="https://ss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=3760263613,561272050&fm=11&gp=0.jpg"
                alt=""
              />
            </span>
          </template>
        </van-cell>
      </van-uploader>

      <van-cell is-link to="Account">
        <!-- 使用 title 插槽来自定义标题 -->
        <template #title>
          <span class="custom-title">用户名</span>
        </template>
        <template #default>
          <span class="value-class" id="font_sz">{{ account }}</span>
        </template>
      </van-cell>
      <van-cell title="收货地址" is-link to="index" />
    </div>
    <p class="upload_p1">账号绑定</p>
    <div class="upload_div2">
      <van-cell is-link @click="exchangeclick">
        <!-- 使用 title 插槽来自定义标题 -->
        <template #title>
          <i class="iconfont icon-shouji1"></i>
          <span class="custom-title">手机</span>
        </template>
      </van-cell>
    </div>
    <van-popup
      v-model="show"
      :class="{
        msgF: true,
        animate__animated: dada1,
        animate__bounceIn: dada2,
        animate__slow: dada3,
      }"
    >
      <div class="msg">
        <div class="msg_div1">
          <!-- <i class="iconfont icon-alert impdiv"></i> -->
          <i class="iconfont icon-alert impdiv"></i>
        </div>
        <p class="msg_p">{{ message }}</p>
        <button class="button1" @click="fanhuiclick">确定</button>
      </div>
    </van-popup>
    <p class="upload_p1">安全设置</p>
    <div>
      <van-cell title="登录密码" is-link to="Password" value="修改" />
    </div>
    <p class="upload_p2">退出登录</p>
  </div>
</template>

<script>
export default {
  name: "Upload",
  data() {
    return {
      show: false,
      message: "请在手机APP中设置",
      account: "用户名",
      dada1: false,
      dada2: false,
      dada3: false,
    };
  },
  methods: {
    exchangeclick() {
      this.show = true;
      this.dada1 = true;
      this.dada2 = true;
      this.dada3 = true;
    },
    fanhuiclick() {
      this.show = false;
      this.dada1 = false;
      this.dada2 = false;
      this.dada3 = false;
    },
  },
  created() {
    this.account = localStorage.getItem("account");
  },
  watch: {
    $route:function(New){
      console.log(New);
      console.log(999999);
    }
  }
};
</script>

<style lang="less">
.upload {
  .upload_div1 {
    margin-top: 10px;
    .van-uploader {
      width: 100%;
      .van-uploader__input-wrapper {
        width: 100%;
      }
    }

    .van-cell--clickable {
      display: flex;
      align-items: center;
      border-bottom: 1px solid #999;
    }
    .upload_div1_cell1_d_span {
      .upload_div1_cell1_d_span_img {
        width: 44px;
        height: 44px;
        border-radius: 50%;
      }
    }
  }
  .upload_p1 {
    font-size: 12px;
    color: #666;
    padding: 9.375px;
  }
  .upload_div2 {
    .van-cell__title {
      display: flex;
      align-items: center;
    }
    .icon-shouji1 {
      width: 22px;
      height: 25px;
      margin-right: 8px;
      background-color: rgb(16, 174, 255);
      font-size: 20px;
      color: white;
    }
  }
  .upload_p2 {
    width: 96%;
    height: 34.667px;
    line-height: 34.667px;
    text-align: center;
    margin: 0 7.51px;
    color: #fff;
    background-color: #d8584a;
    border-radius: 5px;
    margin-top: 30.469px;
    font-size: 14px;
  }
  #font_sz {
    font-size: 16px;
  }
  .msgF {
    border-radius: 10px;
    display: none;
    margin: -20% -37%;
    .msg {
      width: 281.25px;
      text-align: center;
      .msg_div1 {
        .impdiv {
          font-size: 80px;
          color: #f8cb86;
          font-weight: 200;
        }
      }

      .msg_p {
        color: #333333;
        margin-top: 10px;
      }
      .button1 {
        width: 100%;
        height: 42px;
        margin-top: 20px;
        background-color: #4cd964;
        border: none;
      }
    }
  }
  .animate__animated {
    display: block;
  }
}
</style>